
package com.xy.entity.msg;

import com.alibaba.fastjson.annotation.JSONField;
import com.xy.common.jpa.AbstractTimestampEntity;
import com.xy.entity.User;
import com.xy.entity.order.OrderMain;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

@Entity
@Data
public class OrderMsg extends AbstractTimestampEntity{


    private int status;//是否已读
    private String msgId;//标记此处为外键
    private Date pushTime;//推送时间
    private String title;//提示标题
    private String orderStatus;//订单状态
    private String msg;//提示内容
    @Transient
    private int sum;//未读总数

    @JSONField(serialize = false)
    @ManyToOne(cascade = {CascadeType.REFRESH},fetch = FetchType.EAGER)
    @JoinColumn(name = "orderId")
    private OrderMain orderMain;
}

